const jwt = require("jsonwebtoken");
var signkey = "mes_qdhd_mobile_xhykjyxgs";

exports.setToken = function(username, userid){
  return new Promise((reslove, reject)=>{
    const token = jwt.sign({
      name: username,
      _id: userid
    }),
    signkey,
    // {expiresIn: "0.01h"}
  });
  reslove(token)
}